/**
 * 项目分类操作路由
 */
const express = require('express')
const router = express.Router()
const expressJoi = require('@escook/express-joi')
const {add_project_cate, del_project_cate, update_project_cate, get_project_cate, get_project_cate_by_cateName} = require('../schema/projectCate')

const projectCateHandler = require('../router_handler/projectCate')

// 增
router.post('/addProjectCate', expressJoi(add_project_cate), projectCateHandler.addProjectCate)

// 删
router.post('/deleteProjectCate/:id', expressJoi(del_project_cate), projectCateHandler.deleteProjectCate)

// 改
router.post('/updateProjectCate', expressJoi(update_project_cate), projectCateHandler.updateProjectCate)

// 查
router.get('/getProjectCateAll', expressJoi(get_project_cate), projectCateHandler.getProjectCateAll)
// 根据cate_name模糊查询
router.post('/getProjectCateByCateName', expressJoi(get_project_cate_by_cateName), projectCateHandler.getProjectCateByCateName)

module.exports = router



